/* license section

Flash MiniBuilder is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Flash MiniBuilder is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Flash MiniBuilder.  If not, see <http://www.gnu.org/licenses/>.


Author: Victor Dramba
2009
*/

package ro.minibuilder.data
{
	public class CompilerMessage
	{
		static public var pathPrefix:String = '';
		
		public var code:int;
		public var line:int;
		public var col:int;
		public var level:String;
		public var path:String;
		public var message:String;
		public function toString():String
		{
			path = path.replace(/\\/g, '/');
			var p:String = path.indexOf(pathPrefix) == 0 ? path.substr(pathPrefix.length) : path;
			return '['+level+']' + code + ': ' + message + ' (' + p + ':'+line+')';
		}
	}
}